Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several updates to the
ContextMenucomponent, including the addition of aSubMenufeature and various enhancements to the existing functionality. The changes span multiple files, with significant updates to the component structure, utility functions, and styles.New Feature: SubMenu
src/components/SubMenu.tsx: Added a newSubMenucomponent to support nested menu items. This includes logic for positioning and visibility management.app/components/App.tsx: Integrated the newSubMenucomponent within theContextMenustructure.Component Enhancements
src/components/ContextMenu.tsx: Updated theContextMenucomponent to include theSubMenuand adjusted the positioning validation function. [1] [2] [3] [4]src/components/MenuItem.tsx: Ensured theMenuItemcomponent resets its state after an animation ends.Utility and Style Updates
src/utils.ts: Renamed thevalidateWindowPositionfunction tovalidateMenuPositionand updated thecloneChildrenfunction to handle optional props. [1] [2]src/styles.css: Added styles for theSubMenucomponent, including positioning and hover effects. Adjusted existing styles for better integration with the new submenu feature. [1] [2] [3] [4]Export Updates
src/components/index.ts: Exported the newSubMenucomponent.src/index.ts: IncludedSubMenuin the main export list.